home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / TESTING / LARGELST.PAS < prev    next >
Pascal/Delphi Source File  |  1996-08-16  |  784b  |  27 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Testing; how data structures behave when memory is full
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBDEF, EFLIBINI, EFLIBDAT;
  10.  
  11. const Storage = 65535;
  12.  
  13. var Structure : StructureObjectType;
  14.     MaximumStorage : pointer;
  15.  
  16. begin
  17.      GetMem (MaximumStorage, Storage);
  18.  
  19.      { Test the structures capacity }
  20.      with Structure do begin
  21.           Initialize (Storage);
  22.           while IsFree do Add (MaximumStorage^);
  23.           Intercept;
  24.      end;
  25.  
  26.      FreeMem (MaximumStorage, Storage);
  27. end.